-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log4j2: add option to fill code attributes #12592
Conversation
cc @jeanbisutti in case you have a chance to review |
...c/main/java/io/opentelemetry/javaagent/instrumentation/log4j/appender/v2_17/Log4jHelper.java
Show resolved
Hide resolved
StackTraceElement source = sourceSupplier.get(); | ||
if (source != null) { | ||
String fileName = source.getFileName(); | ||
if (fileName != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(optional)
if (fileName != null) { | |
// file name can be null from the StackTraceElement Javadoc | |
if (fileName != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is copy-pasted from the logback instrumentation. Apparently you are the author of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could have been better for the Logback instrumentation.
...io/opentelemetry/instrumentation/log4j/appender/v2_17/AbstractOpenTelemetryAppenderTest.java
Outdated
Show resolved
Hide resolved
110c4b5
to
3eca7a1
Compare
Resolves #12540